#ifndef BASE_SAMPLE_H
#define BASE_SAMPLE_H

#include "stdint.h"
#include <GLES3/gl3.h>
#include "ImageDef.h"

#define MATH_PI 3.1415926535897932384626433832802

class BaseSample {
public:
    BaseSample() {
        m_ProgramObj = 0;
        m_VertexShader = 0;
        m_FragmentShader = 0;
        m_ParentViewWidth = 0;
        m_ParentViewHeight = 0;
    }

    virtual ~BaseSample() {

    }

    virtual void LoadImage(NativeImage *pImage) = 0;

    virtual void Init() = 0;

    virtual void Draw() = 0;

    virtual void Destroy() = 0;

    virtual void OnSurfaceCreated() = 0;
    virtual void OnSurfaceChanged(int width, int height) = 0;
    virtual void setParentViewSize(int w, int h) = 0;

protected:
    GLuint m_VertexShader;
    GLuint m_FragmentShader;
    GLuint m_ProgramObj;
    int m_ParentViewWidth;
    int m_ParentViewHeight;
    float m_ratio;
};

#endif
